package com.example.PolimiAssistant;

import android.app.ProgressDialog;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import com.Wsdl2Code.WebServices.PolimiAssistant.UserProfile;
import com.example.PolimiAssistant.common.CommonActivity;
import com.example.PolimiAssistant.utils.PreferencesManager;
import com.example.PolimiAssistant.utils.UserDataManager;

import java.util.ArrayList;

/**
 * Preferences.java
 *
 * This activity display to the user the main menu. Contains the main actions that
 * the user can perform in the application.
 *
 */
public class MainMenu extends CommonActivity {


    public void onCreate(Bundle savedInstanceState) {

        //Activity initialization
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main_menu);

    }

    /**
     * This method manages the information given by previous activities
     * and redirects the user to the profile view/activity.
     *
     * @param view
     */
    public void goToProfile(View view){

        //1. Create the intent to go to the profile activity
        Intent goToProfile;
        goToProfile = new Intent(context, Profile.class);

        //2. Start the new activity, without closing the main menu.
        startActivity(goToProfile);

    }

    /**
     * This method manages the information given by previous activities
     * and redirects the user to the academic schedule view/activity.
     *
     * @param view
     */
    public void goToSchedule(View view){

        ///1. Create the intent to go to the profile activity
        Intent goToSchedule;
        goToSchedule = new Intent(context, AcademicSchedule.class);

        //2. Start the new activity, without closing the main menu.
        startActivity(goToSchedule);
    }

    /**
     * This method manages the information given by previous activities
     * and redirects the user to the exams view/activity.
     *
     * @param view
     */
    public void goToExams(View view){

        //1. Create the intent to go to the profile activity
        Intent goToExams;
        goToExams = new Intent(context, ExamsSchedule.class);

        //2. Start the new activity, without closing the main menu.
        startActivity(goToExams);

    }

    /**
     * This method manages the information given by previous activities
     * and redirects the user to the classrooms view/activity.
     *
     * @param view
     */
    public void goToClassrooms(View view){

        //1. Create the intent to go to the profile activity
        Intent goToClassrooms;
        goToClassrooms = new Intent(context, Classrooms.class);

        //2. Start the new activity, without closing the main menu.
        startActivity(goToClassrooms);

    }

}

